The present disclosure relates to an electronic apparatus provided with a sensor, such as a photosensor, that prevents erroneous detection of a sensor output due to an ac line noise, and a method for preventing erroneous detection of a sensor output.
An image forming apparatus, which is an electronic apparatus, includes various sensors for detecting a recording sheet or operations, and is configured such that, in response to a detection signal outputted from such a sensor (hereinafter, referred to as a sensor output), a control part performs operation-control of the apparatus. To the control part, power is supplied from a commercial AC (Alternating Current) power supply through a power supply circuit, however, depending upon the situation of the commercial AC power supply, a noise may be generated in the power supply line. Such a noise influences the sensor output or the control part as an AC line noise, and there is the possibility that the control part may erroneously detect the sensor output. Then, in order to remove the AC line noise, the power supply circuit is provided with a noise filter composed of a capacitor, or the like, or a noise filter using a differential amplifying feature of a differential amplifier.